{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import logging\n",
    "\n",
    "\n",
    "# 假设你已经定义了words和其它相关变量\n",
    "word_strings = [elem[1] for elem in words]\n",
    "\n",
    "# 记录word_strings的内容\n",
    "logging.debug(f\"word_strings: {word_strings}\")\n",
    "\n",
    "if embedding == \"phoc\":\n",
    "    # 记录即将调用build_phoc_descriptor之前的变量状态\n",
    "    logging.debug(f\"Before building PHOC descriptor: words={word_strings}, unigrams={unigrams}, levels={phoc_unigram_levels}\")\n",
    "    \n",
    "    self.word_embeddings = build_phoc_descriptor(\n",
    "        words=word_strings,\n",
    "        phoc_unigrams=unigrams,\n",
    "        unigram_levels=phoc_unigram_levels,\n",
    "    )\n",
    "    \n",
    "    # 记录构建完PHOC描述符后的结果\n",
    "    logging.debug(f\"After building PHOC descriptor: word_embeddings={self.word_embeddings}\")"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
